﻿<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeBehind="WxModify.aspx.cs" Inherits="bianzhuo.SupportPlatform.WebUI.BzBusiness.WxModify1" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>商家微信管理</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/UpLoadImgByFinder.js"></script>
    <script type="text/javascript" src="js/Common.js"></script>
    <script type="text/javascript" src="ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="ckfinder/ckfinder.js"></script>
    <style type="text/css">
        .re_form th {
            color: #999;
        }

        td {
            font-size: 14px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="content">
            <ul class="breadcrumb">
                <%if (Request.Cookies["BzSupport_Business"] != null)
                  {
                %>
                <li><a href="BusinessHome.Aspx?MicroId=<%= Request.Cookies["BzSupport_Business"].Values["WxID"] %>">首页</a> <span class="divider">/</span></li>
                <%} %>
                <li class="active">商家微信管理</li>
            </ul>
            <div class="container">
                <div class="re_form">
                    <div class="order_dh">公众号信息</div>
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <th>
                                <span class="biaoji">*</span>&nbsp;商家名称：
                            </th>
                            <td>
                                <input class="input_text" id="TextBox2" runat="server" type="text" name="wxkeyword" required="required" />
                                <input class="input_text" id="TxtMicroAccount" runat="server" type="hidden" name="wxname" />
                            </td>
                        </tr>
                        <tr>
                            <th><span class="biaoji">*</span>&nbsp;微信号：</th>
                            <td>
                                <input class="input_text" id="TxtMicroCode" runat="server" type="text" name="wximg" required="required" />
                            </td>
                        </tr>
                        <tr>
                            <th><span class="biaoji">*</span>&nbsp;公众号头像：
                            </th>
                            <td>
                                <input type="hidden" runat="server" id="txt_img" class="input_text" />
                                <div class="onepic"></div>
                            </td>
                        </tr>
                        <tr>
                            <th><span class="biaoji">*</span>&nbsp;公众号二维码：
                            </th>
                            <td>
                                <input type="hidden" runat="server" id="txt_2dma" class="input_text" />
                                <div class="onepic"></div>
                            </td>
                        </tr>
                        <tr>
                            <td height="50" colspan="2">
                                <div class="order_dh">填入Token和RUL至腾讯公众平台</div>
                            </td>
                        </tr>

                        <tr>
                            <th>
                                <span class="biaoji">*</span>&nbsp;Token：
                            </th>
                            <td>
                                <input class="input_text" id="txtApiToken" readonly="readonly" runat="server" type="text" required="required" name="wxtopimg" />
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <span class="biaoji">*</span>&nbsp;接入URL：
                            </th>
                            <td>
                                <input name="txtApiUrl" type="text" id="txtApiUrl" class="input_text" runat="server" readonly="readonly" value="" />
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <span class="biaoji">*</span>&nbsp;EncodingAESKey：
                            </th>
                            <td>
                                <input name="txtEncodingAESKey" type="text" id="txtEncodingAESKey" class="input_text" runat="server" required="required" value="" /><span class="tips">消息加解密密钥</span>
                            </td>
                        </tr>
                        <tr>
                            <th><span class="biaoji"></span>原始ID：</th>
                            <td>
                                <input class="input_text" type="text" name="OriginalID" id="OriginalID" runat="server" /><span class="tips">微信原始ID</span></td>
                        </tr>

                        <tr>
                            <td height="40" colspan="2">
                                <div class="order_dh">公众号认证设置</div>
                            </td>
                        </tr>
                        <tr>
                            <th><span class="biaoji">*</span>&nbsp;公众号认证：
                            </th>
                            <td>
                                <asp:RadioButtonList ID="isApi" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" EnableTheming="False" EnableViewState="False" CellSpacing="-1">
                                    <asp:ListItem Text="认证服务号&nbsp;&nbsp;" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="认证订阅号&nbsp;&nbsp;" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="未认证&nbsp;&nbsp;" Value="0"></asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <th>&nbsp;认证到期时间：
                            </th>
                            <td>
                                <input name="txtCertificationExpiredTime" type="text" id="CertificationExpiredTime" class="input_text  datetime" runat="server" value="" />
                                <span class="tips">&nbsp;</span>
                            </td>
                        </tr>
                        <tr class="verify">
                            <td height="50" colspan="2">
                                <div class="order_dh">认证号开发者凭据（AppId和AppSecret）至九仟CMS</div>
                            </td>
                        </tr>
                        <tr class="verify">
                            <th><span class="biaoji">*</span>&nbsp;AppId：
                            </th>
                            <td>
                                <input class="input_text" id="txtApiAppId" runat="server" type="text" required="required" />
                            </td>
                        </tr>

                        <tr class="verify">
                            <th><span class="biaoji">*</span>&nbsp;AppSecret：
                            </th>
                            <td>
                                <input class="input_text" id="txtApiAppSecret" runat="server" type="text" required="required" />
                            </td>
                        </tr>



                        <tr style="display: none">
                            <th>接口access_token:
                            </th>
                            <td>
                                <textarea id="txtApiAccess_Token" runat="server" class="input_text6" readonly="readonly" style="color: #999"></textarea>
                            </td>
                        </tr>


                        <tr style="display: none">
                            <th></th>
                            <td>
                                <asp:Button
                                    ID="btnGetAccessToken" runat="server" CssClass="btn" Text="重新获取access_token" OnClick="btnGetAccessToken_Click" /><span class="tips">每次7200秒内有效,每天只能获取2000次!</span>
                            </td>
                        </tr>
                        <tr>
                            <td height="50" colspan="2">
                                <div class="order_dh">微信辅助信息</div>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <span class="biaoji">*</span>&nbsp;微信关注地址：
                            </th>
                            <td>
                                <input class="input_text" id="SubscribeUrl" runat="server" type="text" required="required" />
                            </td>
                        </tr>
                        <tr>
                            <th style="color: #999"><span class="biaoji">*</span>公众号介绍：</th>
                            <td>
                                <textarea name="Description" id="Description" runat="server" class="ckeditor"></textarea>
                        </tr>
                        <tr style="display: none">
                            <td height="40" colspan="2">
                                <div class="eidt_gzhnav">关注微信免费上网（智能WiFi）</div>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <th style="color: #999">已开通智能WIFI：</th>
                            <td>
                                <asp:CheckBox ID="WifisongApi" runat="server" /><span class="tips">已开通智能WiFi</span><span class="tips"><a href="http://wx.ajiuqian.com/BzBusiness/help/HelpInfo.aspx?id=6&parentid=1" target="_blank"><img src="images/help_ico.png">帮助</a></span><span class="tips"><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=800069587&amp;site=qq&amp;menu=yes"><img src="images/qq_ico.png">在线客服</a></span></td>
                        </tr>
                        <tr style="display: none">
                            <th></th>
                            <td><span class="tips">填写Wifisong开发者凭据（AppId和AppSecret）至九仟CMS</span></td>
                        </tr>
                        <tr style="display: none">
                            <th>AppId：
                            </th>
                            <td>
                                <input class="input_text" id="WifisongAppId" runat="server" type="text" name="wxtime" /><span class="tips"><a href="http://wx.ajiuqian.com/BzBusiness/help/HelpInfo.aspx?id=4&parentid=1" target="_blank"><img src="images/help_ico.png" />帮助</a></span><span class="tips"><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=800069587&amp;site=qq&amp;menu=yes"><img src="images/qq_ico.png" />在线客服</a></span>
                            </td>
                        </tr>

                        <tr style="display: none">
                            <th>AppSecret：
                            </th>
                            <td>
                                <input class="input_text" id="WifisongAppSecret" runat="server" type="text" />
                            </td>
                        </tr>
                        <tr style="display: none">
                            <th>微信认证识别关键字：
                            </th>
                            <td>
                                <input class="input_text" id="WifisongCode" runat="server" type="text" />
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td height="40" colspan="2">
                                <div class="eidt_gzhnav">无线小票打印机</div>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <th style="color: #999">已配备易联云打印机</th>
                            <td>
                                <asp:CheckBox ID="GprsPrinter" runat="server" /><span class="tips">已配备易联云打印机</span><span class="tips"><a href="http://wx.ajiuqian.com/BzBusiness/help/HelpInfo.aspx?id=55&parentid=1" target="_blank"><img src="images/help_ico.png">帮助</a></span><span class="tips"><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=800069587&amp;site=qq&amp;menu=yes"><img src="images/qq_ico.png">在线客服</a></span></td>
                        </tr>
                        <tr class="GprsPrintParams" style="display: none">
                            <th>打印机接口参数:</th>
                            <td>
                                <textarea id="GprsPrintParams" runat="server" class="input_text6" style="color: #999">url=http://114.215.116.141:8888&partner=&machine_code=&mkey=&apikey=</textarea>
                            </td>
                        </tr>
                        <tr class="GprsPrintParams" style="display: none">
                            <th>打印机打印联数:</th>
                            <td>
                                <input id="GprsPrintNum" type="text" runat="server" class="input_text" /><span class="tips">1-9联</span>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td>
                                <asp:Button ID="BtnSave" runat="server" class="btn btn-01" Text="保 存" OnClick="Button1_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </form>
    <script>

        //切换显示打印机配置参数
        $('#GprsPrinter').click(function () {
            if (this.checked) {
                $('.GprsPrintParams').show();
            } else {
                $('.GprsPrintParams').hide();
            }
        });
        if ($('#GprsPrinter').get(0).checked) {

            $('.GprsPrintParams').show();
        } else {
            $('.GprsPrintParams').hide();
        }

        $('[required]').blur(function () {
            if (this.value.length == 0) {
                $(this).next('.tips').addClass('tip_er').removeClass('tip_ok');
                return false;
            } else {
                $(this).next('.tips').removeClass('tip_er').addClass('tip_ok');
            }


        })

        $('form').submit(function () {
            if ($('[required]').val().length == 0) {
                alert('必填内容必须输入');
                return false;
            }
            if ($('[name=isApi]:checked').val() == undefined) {
                alert('公众号认证必须选择一项');
                return false;
            }

            if ($('#Description').val().length < 15) {
                alert('公众号介绍必须输入15个字符以上');
                return false;
            }
        })

    </script>
</body>
</html>
